import { $t } from "@/plugins/i18n";
import { im } from "@/router/enums";

export default {
  path: "/im",
  redirect: "/im/user/list",
  meta: {
    title: $t("menus.pureIm"),
    icon: "ep:histogram",
    rank: im
  },
  children: [
    {
      path: "/im/user",
      meta: {
        title: $t("menus.pureImUser"),
        keepAlive: true
      },
      redirect: "/im/user/list",
      children: [
        {
          path: "/im/user/list",
          component: () => import("@/views/im/user/list/index.vue"),
          name: "ImUserList",
          meta: {
            title: $t("menus.pureImUserList"),
            keepAlive: true
          }
        }
      ]
    },
    {
      path: "/im/group",
      meta: {
        title: $t("menus.pureImGroup"),
        keepAlive: true
      },
      redirect: "/im/group/list",
      children: [
        {
          path: "/im/group/list",
          component: () => import("@/views/im/group/list/index.vue"),
          name: "ImGroupList",
          meta: {
            title: $t("menus.pureImGroupList"),
            keepAlive: true
          }
        }
      ]
    },
    {
      path: "/im/message",
      meta: {
        title: $t("menus.pureImMessage"),
        keepAlive: true
      },
      redirect: "/im/message",
      children: [
        {
          path: "/im/message/user",
          component: () => import("@/views/im/message/user/index.vue"),
          name: "ImMessageUser",
          meta: {
            title: $t("menus.pureImMessageUser"),
            keepAlive: true
          }
        },
        {
          path: "/im/message/group",
          component: () => import("@/views/im/message/group/index.vue"),
          name: "ImMessageGroup",
          meta: {
            title: $t("menus.pureImMessageGroup"),
            keepAlive: true
          }
        }
      ]
    },
    {
      path: "/im/log",
      meta: {
        title: $t("menus.pureImLog"),
        keepAlive: true
      },
      redirect: "/im/log/list",
      children: [
        {
          path: "/im/log/list",
          component: () => import("@/views/im/log/list/index.vue"),
          name: "ImLogList",
          meta: {
            title: $t("menus.pureImLogList"),
            keepAlive: true
          }
        }
      ]
    },
    {
      path: "/im/notice",
      meta: {
        title: $t("menus.pureImMessage"),
        keepAlive: true
      },
      redirect: "/im/notice",
      children: [
        {
          path: "/im/notice/account",
          component: () => import("@/views/im/notice/account/index.vue"),
          name: "ImNoticeAccount",
          meta: {
            title: $t("menus.pureImNoticeAccount"),
            keepAlive: true
          }
        },
        {
          path: "/im/notice/send",
          component: () => import("@/views/im/notice/sendNotice/index.vue"),
          name: "ImNoticeSend",
          meta: {
            title: $t("menus.pureImNoticeSend"),
            keepAlive: true
          }
        }
      ]
    }
  ]
} satisfies RouteConfigsTable;
